﻿<table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px" width="533px">
    <tr>
        <th rowspan="4" width="50px" style="padding: 0px 2px 0px 2px;vertical-align: top;">
            <a href='@Url.Action("ProfileView", "Profile", new { id = ViewBag.Id })' class="nobtn">
                <img src= "@ViewBag.ProfilePicturePath" alt="Profile picture" title="Profile picture" style="width: 50px;height: 50px;" />
            </a>
        </th>
        <td style="padding: 0px 2px 0px 2px">
            <a href='@Url.Action("ProfileView", "Profile", new { id = ViewBag.Id })' class="nobtn">
                @ViewBag.Fullname
            </a>
            &gt
            <a href='@Url.Action("ProfileView", "Profile", new { id = ViewBag.FriendId })' class="nobtn">
                @ViewBag.FriendFullname
            </a>
        </td>
    </tr>
    <tr>
        <td style="padding: 0px 2px 0px 2px;word-break:break-all;color:#222">
            @if(ViewBag.PostType == "Photo")
            {
                <a href='@Url.Action("ImageGallery", "Album", new { id = ViewBag.FileId })' class="nobtn">
                    <img src="@ViewBag.FilePath" alt="@ViewBag.FileName" title="@ViewBag.FileName" style="width:150px;height:120px;" />
                </a>
                <br />
                @ViewBag.Description
            }
            else if (ViewBag.PostType == "Video")
            {
                <a class="nobtn"@*"media {width:480, height:280}"*@ href="@ViewBag.FilePath">@ViewBag.FileName . @ViewBag.FileExtension</a>
                <br />
                @ViewBag.Description
            }
            else if (ViewBag.PostType == "Audio")
            {
                <a href="@ViewBag.FilePath" class="nobtn">@ViewBag.FileName . @ViewBag.FileExtension</a>
                <br />
                @ViewBag.Description
            }
            else if (ViewBag.PostType == "Document")
            {
                <a href="@ViewBag.FilePath" class="nobtn">@ViewBag.FileName . @ViewBag.FileExtension</a>
                <br />
                @ViewBag.Description
            }
            else if (ViewBag.PostType == "Text")
            {
                @ViewBag.Text
            }
            else if (ViewBag.PostType == "Link")
            {
                <a href="@ViewBag.Description" class="nobtn" style="color:blue">@ViewBag.Text</a>
            }
        </td>
    </tr>
    <tr>
        <td style="padding: 0px 2px 0px 2px;color:Gray">
            @ViewBag.Created.ToString("dd MMMM, yyyy a't' HH:mm") *
            @(Ajax.ActionLink("Like/Unlike", "PostLike", "Post", new { id = ViewBag.PostId }, new AjaxOptions { UpdateTargetId = ViewBag.PostId.ToString(), OnSuccess = "", InsertionMode = System.Web.Mvc.Ajax.InsertionMode.InsertBefore, HttpMethod = "GET" }, new { @class = "nobtn" })) *
            @(Ajax.ActionLink("People like this", "PostLikeList", "Post", new { id = ViewBag.PostId }, new AjaxOptions { UpdateTargetId = "specialPeopleLikeList", OnSuccess = "peopleLikeListSuccess", InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace, HttpMethod = "GET" }, new { @class = "nobtn" }))
        </td>
    </tr>
</table>
